<?php 

$mongoDB_File = new Mongo("192.168.10.219:10000");

/* 몽고DB => newDB 접속 */
$fileDB = $mongoDB_File->selectDB('log_imglink_history');

/* 댓글 콜렉션 접속 */
$file_Collection = $fileDB->selectCollection("log.gall_imglink_".date(Y)."_".date(m));


$regdate = new MongoTimestamp();

$file_query = array(
		"id" => $c_data['id'],
		"p_no" => $article_insert_id,
		"user_id" => $c_data['user_id'],
		"u_key" => $_SESSION['u_key'],
		"ip" => $_SERVER['REMOTE_ADDR'],
		"img_link" => $match[1][$i],
		"img_type" => "0",
		"regdate" => $regdate,
		"type" => array(
				"admin_id" => "",
				"hidden" => "0"
		)

);

if(strpos($match[1][$i],'dcimg1.dcinside.com')) {

} else {
	$file_Collection->insert($file_query,array("safe" => true));
}
?>